package com.wantup.springboot.boot.jms.mkw.jms_activemq.springjms.producer;

import org.springframework.context.support.ClassPathXmlApplicationContext;

/**
 * @author zhapluowei
 * @date 2018-11-16 0:34
 */
public class AppProducer {
    public static void main(String[] args) {
        ClassPathXmlApplicationContext context = new ClassPathXmlApplicationContext("producer.xml");
        ProducerService service = context.getBean(ProducerService.class);
        for (int i = 0; i < 1000; i++) {
            service.sendMessage("你好啊！ 傻狗 " +i);
        }
        context.close();
    }
}
